package mediator.example;

/**
 * @Author：LJ
 * @Description：抽象中介者
 * @Date: 2017/11/28
 * @Modified By:
 */
public abstract class AbstarctMediator {
    protected Purchase purchase;
    protected Sale sale;
    protected Stock stock;

    //构造函数
    public AbstarctMediator() {
        this.purchase = new Purchase(this);
        this.sale = new Sale(this);
        this.stock = new Stock(this);
    }

    //中介者最重要的方法叫做事件方法,处理多个对象之间的关系
    public abstract void execute(String str, Object... objects);
}
